<template>
  <div class="workbench-index">
    <div class="workbench-body">
<!--      工作看板-->
      <sign-board class="workbench-board"
                  :identity="identity"/>

<!--      公告通知-->
      <announcement-notice class="workbench-notice"/>

<!--      在途跟踪  -->
      <client-tracking class="workbench-tracking"
                       v-if="identity === 'client'"/>
      <carriers-tracking class="workbench-tracking"
                         v-if="identity === 'carriers'"/>
      <driver-tracking class="workbench-tracking"
                       v-if="identity === 'driver'"/>

<!--      数据总览-->
      <client-statistics class="workbench-statistic"
                         v-if="identity === 'client'"/>
      <carriers-statistics class="workbench-statistic"
                           v-if="identity === 'carriers'"/>
      <driver-statistics class="workbench-statistic"
                         v-if="identity === 'driver'"/>





      <div style="clear: both"></div>
    </div>



  </div>
</template>


<script>
import SignBoard from "@/components/workbench/SignBoard";
import AnnouncementNotice from "@/components/workbench/AnnouncementNotice";
import ClientTracking from "@/components/workbench/onGoTracking/ClientTracking";
import CarriersTracking from "@/components/workbench/onGoTracking/CarriersTracking";
import DriverTracking from "@/components/workbench/onGoTracking/DriverTracking";
import ClientStatistics from "@/components/workbench/statistics/ClientStatistics";
import CarriersStatistics from "@/components/workbench/statistics/CarriersStatistics";
import DriverStatistics from "@/components/workbench/statistics/DriverStatistics";

export default {
  name: 'workbenchIndex',
  components:{
    SignBoard,
    AnnouncementNotice,
    ClientTracking,
    CarriersTracking,
    DriverTracking,
    ClientStatistics,
    CarriersStatistics,
    DriverStatistics,


  },
  props:{},
  data(){
    return{
      title: '',

      identity: '', // 用户身份
    }
  },
  created() {

    this.init()
  },
  methods:{
    async init(){
      this.identity = localStorage.getItem("identity")
    },

  },
}
</script>

<style scoped lang="scss">


.workbench-body{
  width: 100%;
  position: relative;

  .workbench-board{
    float: left;
  }

  .workbench-notice{
    float: left;
  }

  .workbench-tracking{
    float: left;
  }

  .workbench-statistic{
    margin-top: 10px;
    float: left;
  }
}

</style>